import VueRouter from "vue-router"; //引用路由模块

import homecontainer from "./component/homecontainer.vue";
import memebercontainer from "./component/memebercontainer.vue";
import searchcontainer from "./component/searchcontainer.vue";
import shopcarcontainer from "./component/shopcarcontainer.vue";
import newslist from "./component/newslist.vue";
import newsinfo from "./component/newsinfo.vue";
import photolist from "./component/photolist.vue";
import photoinfo from "./component/photoinfo.vue";
import goodslist from "./component/goodslist.vue";
import goodsinfo from "./component/goodsinfo.vue";
import goodsdesc from "./component/goodsdesc.vue";
import goodscomment from "./component/goodscomment.vue";


var router = new VueRouter({
    routes: [
        { path: "/", redirect: "/home" },
        { path: "/home", component: homecontainer },
        { path: "/memeber", component: memebercontainer },
        { path: "/search", component: searchcontainer },
        { path: "/shopcar", component: shopcarcontainer },
        { path: "/home/newslist", component: newslist },
        { path: "/home/newsinfo:id", component: newsinfo },
        { path: "/home/photolist", component: photolist },
        { path: "/home/photoinfo", component: photoinfo },
        { path: "/home/goodslist", component: goodslist },
        { path: "/home/goodsinfo", component: goodsinfo },
        { path: "/home/goodsdesc", component: goodsdesc },
        { path: "/home/goodscomment", component: goodscomment }
    ],
    linkActiveClass: "mui-active"
});

export default router;